package cn.liccshop.core.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.util.List;

import cn.liccshop.sys.base.BaseBean;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 订单信息基本表
 * </p>
 *
 * @author LiCC
 * @since 2019-05-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "shop_order_info")
public class ShopOrderInfo extends BaseBean {

private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    /**
     * 订单编号
     */
    @TableField("order_sn")
    private String orderSn;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 订单状态
     */
    @TableField("order_status")
    private Integer orderStatus;

    /**
     * 配送状态
     */
    @TableField("shipping_status")
    private Integer shippingStatus;

    /**
     * 国家
     */
    @TableField("country")
    private String country;

    /**
     * 省份
     */
    @TableField("province")
    private String province;

    /**
     * 城市
     */
    @TableField("city")
    private String city;

    /**
     * 地区
     */
    @TableField("district")
    private String district;

    /**
     * 街道
     */
    @TableField("street")
    private String street;

    /**
     * 详细地址
     */
    @TableField("address")
    private String address;

    /**
     * 邮政编码
     */
    @TableField("zipcode")
    private String zipcode;

    /**
     * 手机
     */
    @TableField("phone")
    private String phone;

    /**
     * 收货人姓名
     */
    @TableField("consignee")
    private String consignee;

    /**
     * 订单附言，提交前填写
     */
    @TableField("postscript")
    private String postscript;

    /**
     * 商品总金额
     */
    @TableField("goods_amount")
    private BigDecimal goodsAmount;

    /**
     * 配送费用
     */
    @TableField("shipping_fee")
    private BigDecimal shippingFee;

    /**
     * 订单生成时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;

    /**
     * 订单确认时间
     */
    @TableField("confirm_time")
    private LocalDateTime confirmTime;

    /**
     * 订单支付时间
     */
    @TableField("pay_time")
    private LocalDateTime payTime;

    /**
     * 订单配送时间
     */
    @TableField("shipping_time")
    private LocalDateTime shippingTime;

    /**
     * 订单确认收货时间
     */
    @TableField("delivery_time")
    private LocalDateTime deliveryTime;

    /**
     * 订单退货处理完时间
     */
    @TableField("return_time")
    private LocalDateTime returnTime;

    /**
     * 订单退货申请时间
     */
    @TableField("applay_return_time")
    private LocalDateTime applayReturnTime;

    /**
     * 发货单号，发货时填写，可在订单查询查看
     */
    @TableField("invoice_no")
    private String invoiceNo;

    /**
     * 创建者
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    private LocalDateTime updateDate;

    /**
     * 备注信息
     */
    @TableField("remarks")
    private String remarks;

    /**
     * 删除标记
     */
    @TableField("del_flag")
    private Integer delFlag;

    /**
     * 订单商品信息
     */
    @TableField(exist = false)
    private List<ShopOrderGoods> orderGoods;

    /**
     * 用户信息
     */
    @TableField(exist = false)
    private ShopUser shopUser;

    /**
     * 用户信息
     */
    @TableField(exist = false)
    private ShopOrderReturn orderReturn;


}
